package po;

import java.io.Serializable;

public class BookPO implements Serializable {
	
	private static final long serialVersionUID = 2023628828478822472L;

	private int id;
	
	private String name;
	private String description;
	private String isbn;
	private String author;
	private String press;
	private int publishingYear;
	
	private int catalogID;
	
	private double price;
	private double discount;
	
	public BookPO(int id, String name, String description, String isbn,
			String author, String press, int publishingYear, int catalogId,
			double price, double discount) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.isbn = isbn;
		this.author = author;
		this.press = press;
		this.publishingYear = publishingYear;
		this.catalogID = catalogId;
		this.price = price;
		this.discount = discount;
	}
	
	public BookPO() {
		this.id = 0;
		this.name = "";
		this.description = "";
		this.isbn = "";
		this.author = "";
		this.press = "";
		this.publishingYear = 0;
		this.catalogID = 0;
		this.price = 0.0;
		this.discount = 1.0;
	}
	
	public BookPO(BookPO bookPO) {
		this.id = bookPO.id;
		this.name = bookPO.name;
		this.description = bookPO.description;
		this.isbn = bookPO.isbn;
		this.author = bookPO.author;
		this.press = bookPO.press;
		this.publishingYear = bookPO.publishingYear;
		this.catalogID = bookPO.catalogID;
		this.price = bookPO.price;
		this.discount = bookPO.discount;
	}

	@Override
	public String toString() {
		return "BookPO [id=" + id + ", name=" + name + ", description="
				+ description + ", isbn=" + isbn + ", author=" + author
				+ ", press=" + press + ", publishingYear=" + publishingYear
				+ ", catalogId=" + catalogID + ", price=" + price
				+ ", discount=" + discount + "]";
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setCatalogID(int catalogId) {
		this.catalogID = catalogId;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	public int getId() {
		return id;
	}

	public int getCatalogID() {
		return catalogID;
	}

	public double getPrice() {
		return price;
	}

	public double getDiscount() {
		return discount;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}

	public String getIsbn() {
		return isbn;
	}

	public String getAuthor() {
		return author;
	}

	public String getPress() {
		return press;
	}

	public int getPublishingYear() {
		return publishingYear;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public void setPress(String press) {
		this.press = press;
	}

	public void setPublishingYear(int publishingYear) {
		this.publishingYear = publishingYear;
	}

}
